﻿@model Ext.Net.Node
@{
    var x = Html.X();
}
@(
        x.Window().Layout(LayoutType.Fit)
            .CloseAction(CloseAction.Destroy)
            .Width(585).Height(450)
            .Items(
                    x.TreePanel()
                        .Root(Model)
                        .RootVisible(false)
                        .Buttons(
                            x.Button().Text("提交").Icon(Icon.Disk)
                                .DirectEvents(de =>
                                {
                                    de.Click.Action = "Save";
                                    de.Click.ExtraParams.Add(new Parameter("owner", Request["owner"].ToString()));
                                    de.Click.ExtraParams.Add(new Parameter("ownerId", Request["ownerId"].ToString()));
                                    de.Click.ExtraParams.Add(new Parameter("ids", "App.Grid.GetTreeValues(this)", ParameterMode.Raw));
                                    de.Click.EventMask.ShowMask = true;
                                    de.Click.EventMask.Msg = "正在提交...";
                                    de.Click.EventMask.MinDelay = 1000;
                                    de.Click.Success = "App.Edit.PostBackSuccess";
                                })
                                ,
                            x.Button().Text("关闭").Icon(Icon.Cancel).OnClientClick("App.Edit.CloseWindow(this)")
                        )
            )

      )